package com.dbdata.move.model;

// Generated cafuc by Hibernate Tools 4

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * AirplaneMaintain generated by hbm2java
 */
@Entity
@Table(name = "airplane_maintain")
public class AirplaneMaintain implements java.io.Serializable {

	private Long id;
	private AirplaneNumber airplaneNumber;
	private String description;
	private String operator;
	private Date beginDate;
	private Date endDate;

	public AirplaneMaintain() {
	}

	public AirplaneMaintain(AirplaneNumber airplaneNumber) {
		this.airplaneNumber = airplaneNumber;
	}

	public AirplaneMaintain(AirplaneNumber airplaneNumber, String description,
			String operator, Date beginDate, Date endDate) {
		this.airplaneNumber = airplaneNumber;
		this.description = description;
		this.operator = operator;
		this.beginDate = beginDate;
		this.endDate = endDate;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ID", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "AIRPLANE_ID", nullable = false)
	public AirplaneNumber getAirplaneNumber() {
		return this.airplaneNumber;
	}

	public void setAirplaneNumber(AirplaneNumber airplaneNumber) {
		this.airplaneNumber = airplaneNumber;
	}

	@Column(name = "DESCRIPTION", length = 200)
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Column(name = "OPERATOR", length = 30)
	public String getOperator() {
		return this.operator;
	}

	public void setOperator(String operator) {
		this.operator = operator;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "BEGIN_DATE", length = 19)
	public Date getBeginDate() {
		return this.beginDate;
	}

	public void setBeginDate(Date beginDate) {
		this.beginDate = beginDate;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "END_DATE", length = 19)
	public Date getEndDate() {
		return this.endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

}
